Ioctl Commands and Structures

ioctl()

#include ioctl.h>

struct tchars char t_intrc;interrupt character char t_quitc;quit character char t_start;start output character char t_stopc;stop output character char t_eofc;EOF character char t_brkc;break character

DefineValueMeaning


TIOCGETP(('T'< < 8) || 0)get param. - gtty TIOCSETP(('T'< < 8) || 1)set param. - stty TIOCSETNTIOCSETPset param., no flush TIOCGETC(('T'< < 8) || 2)get spec. char. TIOCSETC(('T'< < 8) || 3)set spec. char. TIOCGLTC(('T'< < 8) || 4)get loc. spec. char. TIOCSLTC(('T'< < 8) || 5)set loc. spec. char.

struct ltchars char t_suspc;stop process sig. char t_dsuspc;delayed stop process sig. char t_rprntc;reprint line char t_flushc;flush output char t_werasc;word erase char t_lnextc;literal next char.

The following defines apply only, when MiNT is running.

DefineValueMeaning


FIONREAD(('F'< < 8) || 1) get # byte to rd FIONWRITE(('F'< < 8) || 2) TIOCGPGRP(('T'< < 8) || 6) get pgrp of tty TIOCSPGRP(('T'< < 8) || 7) set pgrp of tty TIOCFLUSH(('T'< < 8) || 8) flush buffers TIOCSTOP(('T'< < 8) || 9) stop output TIOCSTART(('T'< < 8) || 10)start output PPROCADDR(('P'< < 8) || 1) PBASEADDR(('P'< < 8) || 2)

struct sgttyb char sg_ispeed;input speed char sg_ospeed;output speed char sg_erase;erase character char sg_kill;kill character short sg_flags;flags

DefineValueMeaning


CRMOD0x0001map \r to \r \n on output CBREAK0x0002half-cooked mode ECHO0x0004echo input XTABS0x0008expand tabs on output RAW0x0010no I/O processing LCASE0x0020will never do anything TANDEM0x0000not needed META0x0100Alternate as meta key EVENP0x4000even parity ODDP0x8000odd parity ANYPspeed betw. 300–9600 Bd ALLDELAY0